import {
  getAction,
  deleteAction,
  putAction,
  postAction,
  httpAction,
  uploadAction,
  fromDataPostAction,
} from '@/api/manage'
// 生产工单列表
export const productOrderList = (params) => postAction('/produceorder/produceOrderInfo/list', params)
// 生产工单-批量校验修改工单状态
export const batchValidOrUpdateStatus = (params) => getAction('/produceorder/produceOrderInfo/updateOrderStatus', params)
// 产品列表
export const getAllGoodsBaseInfo = (params) => getAction('/wms/goods/getAllGoodsBaseInfo', params)
//工艺列表
export const queryOptionList = (params) => getAction('/mess/messProductCraft/queryOptionList', params)
//获取工艺下的工艺路线
export const queryCraftListByCraftId = (params) => getAction('/mess/messProductCraft/queryCraftListByCraftId', params)
//班组列表
export const teamGroup = (params) => getAction('/mess/teamGroup/queryOptionList', params)
//设备列表
export const deviceApi = (params) => getAction('/mess/device/queryOptionList', params)
//计划投料
export const inventoryApi = (params) => getAction('/mess/bomInfo/queryBomListByBomIdOrGoodsId', params)
//生产工单-添加
export const addWorkOrderApi = (data) => postAction('/mess/messProductOrder/add', data)
//生产工单-通过id查询
export const workOrderDetailApi = (params) => getAction('/mess/messProductOrder/queryById', params)
//报工记录-根据查询参数分页查询报工列表数据
export const pageQueryByQryDto = (params) => getAction('/mess/messTaskReportWorkApply/pageQueryByQryDto', params)
//领料表单-通过工单id获取领料申请列表
export const pageQueryReciveMaterialApplyByOrderId = (params) =>
  getAction('/mess/messReceiveMaterialApply/pageQueryReciveMaterialApplyByOrderId', params)
//领料表单-通过工单id获取退料申请列表
export const pageQueryReturnMaterialApplyByOrderId = (params) =>
  getAction('/mess/messReturnMaterialApply/pageQueryReturnMaterialApplyByOrderId', params)
//领料表单-通过工单id获取领料申请列表
export const pageQueryRemedyMaterialApplyByOrderId = (params) =>
  getAction('/mess/messRemedyMaterialApply/pageQueryRemedyMaterialApplyByOrderId', params)
//合格品清单-分页列表查询
export const pageQueryQualityInboundRecord = (params) =>
  getAction('/mess/messQualifiedList/pageQueryQualityInboundRecord', params)
//通过订单id分页查询让步接收记录
export const pageQueryNotQualityForCompromiseRecordByOrderId = (params) =>
  getAction('/mess/messNotQualityHandleIinfoDetail/pageQueryNotQualityForCompromiseRecordByOrderId', params)
//通过订单id分页查询报废记录
export const pageQueryNotQualityForScrapRecordByOrderId = (params) =>
  getAction('/mess/messNotQualityHandleIinfoDetail/pageQueryNotQualityForScrapRecordByOrderId', params)
//通过订单id分页查询返修记录
export const pageQueryNotQualityForRepairRecordByOrderId = (params) =>
  getAction('/mess/messNotQualityHandleIinfoDetail/pageQueryNotQualityForRepairRecordByOrderId', params)

//报工记录-分页列表查询
export const reportApiList = (params) => getAction('/mess/messTaskReportWorkApply/list', params)
//报工记录-批量删除
export const deleteBatch = (params) => deleteAction('/mess/messTaskReportWorkApply/deleteBatch', params)
export const messTaskReportWorkApplyEdit = (params) => putAction('/mess/messTaskReportWorkApply/edit', params)
//报工记录-通过id删除
export const deleteApi = (params) => deleteAction('/mess/messTaskReportWorkApply/delete', params)
//报工记录-通过id查询
export const recordDetailApi = (params) => getAction('/mess/messTaskReportWorkApply/queryById', params)
//生产工单-查询所有工单编号字典
export const getOrderCodeDict = (params) => getAction('/mess/messProductOrder/getOrderCodeDict', params)
//生产质检任务-获取工序任务列表（包含报工情况）
export const getProcessOptions = (params) => getAction('/mess/messProductOrderTask/getProcessOptions', params)
//生产质检任务-通过id查询
export const taskDetailApi = (params) => getAction('/mess/messProductOrderTask/queryById', params)
//生产质检任务-查询报工工序任务下的报工操作人
export const getReportTeamUserListByTaskId = (params) =>
  getAction('/mess/messProductOrderTask/getReportTeamUserListByTaskId', params)
//生产质检任务-查询报工工序任务下的报工操作人
export const recordAdd = (data) => postAction('/mess/messTaskReportWorkApply/add', data)
//生产质检任务-分页列表查询
export const taskListApi = (params) => postAction('/produce/produceOrderTask/list', params)
//生产质检任务-获取工序报工状态
export const processTaskCompletionStatics = (params) =>
  getAction('/mess/messProductOrderTask/processTaskCompletionStatics', params)
//生产质检任务-通过id删除
export const deleteTaskApi = (params) => deleteAction('/mess/messProductOrderTask/delete', params)
//报工记录-批量添加
export const reportBatchAdd = (data) => postAction('/mess/messTaskReportWorkApply/batchAdd', data)
//故障报修表-分页列表查询
export const messDeviceRepair = (params) => getAction('/assetmgt/messDeviceRepair/list', params)
//故障报修表-验证
export const verificationRepair = (data) => postAction('/assetmgt/messDeviceRepair/verificationRepair', data)
//故障报修表-退回
export const sendback = (data) => postAction('/assetmgt/messDeviceRepair/sendback', data)
//故障报修表-接收
export const receiveRepair = (data) => postAction('/assetmgt/messDeviceRepair/receiveRepair', data)
//故障报修表-派工
export const dispatch = (data) => postAction('/assetmgt/messDeviceRepair/dispatch', data)
//故障报修表-派工
export const repairAdd = (data) => postAction('/assetmgt/messDeviceRepair/add', data)
//故障报修表-用户最新维修信息
export const reportNewRepairInfo = (data) => postAction('/assetmgt/messDeviceRepair/reportNewRepairInfo', data)
//故障报修表-汇报
export const repairReport = (data) => postAction('/assetmgt/messDeviceRepair/report', data)
//故障报修表-通过id查询详情
export const queryInfoById = (params) => getAction('/assetmgt/messDeviceRepair/queryInfoById', params)
//生产进度大屏接口
export const getOrderProgressBigScreen = (params) =>
  getAction('/mess/messProductOrder/getOrderProgressBigScreen', params)
//生产进度大屏刷新时间
export const queryByKey = (params) => getAction('/system/sysSetting/queryByKey', params)
//生产大屏——产量趋势图
export const getProductionTrendChart = (params) => getAction('/signboard/produce/production10', params)
//生产大屏——不合格品趋势图
export const getNotQualifiedTrendChart = (params) => getAction('/signboard/produce/unqualified10', params)
//生产大屏——生产投料进度
export const queryProductMaterialProgressList = (params) =>
  getAction('/mess/messProductBigScreen/queryProductMaterialProgressList', params)
//生产大屏——info信息,日生产总量
export const getProductBlockChart = (params) => getAction('/signboard/produce/dailyTotal', params)
//生产大屏——生产工单
export const BigScreenOrderList = (params) => getAction('/signboard/produce/productionOrder', params)
//设备大屏-点巡检任务
export const checkTaskList = (params) => getAction('/mess/messDeviceBigScreen/checkTaskList', params)
//设备大屏-故障报修
export const deviceRepairList = (params) => getAction('/mess/messDeviceBigScreen/deviceRepairList', params)
//设备大屏-保养任务
export const maintainTaskList = (params) => getAction('/mess/messDeviceBigScreen/maintainTaskList', params)
//设备大屏-设备类别占比
export const deviceCategoryNumRate = (params) => getAction('/mess/messDeviceBigScreen/deviceCategoryNumRate', params)
//设备大屏-设备现状
export const getDeviceStatus = (params) => getAction('/mess/messDeviceBigScreen/getDeviceStatus', params)
//设备大屏-设备现状
export const deviceFaultCategoryStatistics = (params) =>
  getAction('/mess/messDeviceBigScreen/deviceFaultCategoryStatistics', params)
//大屏-查询租户套餐下的大屏
export const listAllByCombo = (params) => getAction('/combo/sysBigScreen/listAllByCombo', params)
//生产报表-用料统计
export const getUseMaterialsStatistics = (params) =>
  getAction('/mess/messProductReport/getUseMaterialsStatistics', params)
//生产报表-用料统计(新版)
export const getUseMaterialsStatisticsGoodsDimension = (params) =>
  getAction('/mess/messProductReport/getUseMaterialsStatisticsGoodsDimension', params)
//附件导入记录表-分页列表查询
export const sysUploadTaskList = (params) => getAction('/importExport/sysUploadTask/list', params)
//附件导入记录表-通过id删除
export const deleteImport = (params) => deleteAction('/importExport/sysUploadTask/delete', params)
//未归档的销售合同
export const getAllCompletedContract = (params) => getAction('salemgt/erpSaleContract/getAllCompletedContract', params)
//工序任务列表
export const getTaskOptionList = (params) => getAction('/mess/messProductOrderTask/getTaskOptionList', params)
//工序字典列表
export const getDictPageList = (params) => getAction('/mess/messProductProcess/getDictPageList', params)
//生产批次-添加
export const messProductBatchAdd = (params) => postAction('/mess/messProductBatch/add', params)
//生产批次-编辑
export const messProductBatchEdit = (params) => putAction('/mess/messProductBatch/edit', params)
//生产批次-列表
export const messProductBatchPageList = (params) => getAction('/mess/messProductBatch/pageList', params)
//生产批次-列表(流转卡)
export const messProductBatchList = (params) => getAction('/mess/messProductBatch/list', params)
//生产批次-删除
export const messProductBatchDel = (params) => putAction('/mess/messProductBatch/delete', params)
//生产批次-批量添加
export const messProductBatchBatchAdd = (params) => postAction('/mess/messProductBatch/batchAdd', params)
//生产批次-生成批次号
export const genBatchCode = (params) => postAction('/mess/messProductBatch/genBatchCode', params)
//生产批次-记录打印次数
export const messProductBatchPrint = (params) => putAction(`/mess/messProductBatch/print?ids=${params}`)
//生产批次-批次生产记录
export const queryProduceRecord = (params) => getAction('/mess/messProductBatch/queryProduceRecord', params)
//生产批次-批次设备列表
export const getDeviceListByBatchId = (params) => getAction('/mess/messProductBatch/getDeviceListByBatchId', params)
//生产批次-批次操作人列表
export const getOperatorListByBatchId = (params) => getAction('/mess/messProductBatch/getOperatorListByBatchId', params)
//生产批次-批次班组列表
export const getTeamGroupByBatchId = (params) => getAction('/mess/messProductBatch/getTeamGroupByBatchId', params)
//报工-可报工批次
export const queryBatchTaskReportList = (params) =>
  getAction('/mess/messProductBatchTask/queryBatchTaskReportList', params)
//工单详情-批次列表
export const pageQueryOrderProdBatchList = (params) =>
  getAction('/mess/messProductBatch/pageQueryOrderProdBatchList', params)
//工单详情-用料记录
export const queryMaterialUseRecordByOrderId = (params) =>
  getAction('/mess/messProductOrder/queryMaterialUseRecordByOrderId', params)
//任务详情-批次信息
export const queryRelationBatchListByTaskId = (params) =>
  getAction('/mess/messProductBatch/queryRelationBatchListByTaskId', params)
export const getProcessList = (params) => getAction('/mess/messTaskReportWorkApply/getProcessList', params)
export const getFieldTypeDict = (params) => getAction('/basicDynamicFieldConfig/getFieldTypeDict', params)
export const saveEntity = (params) => postAction('/basicDynamicFieldConfig/saveEntity', params)
export const getFormTypeDict = (params) => getAction('/basicDynamicFieldConfig/getFormTypeDict', params)
export const ClientFormList = (params) => getAction('/basicDynamicFieldConfig/list', params)
export const queryForm = (params) => getAction('/basicDynamicFieldConfig/queryById', params)
export const editForm = (params) => postAction('/basicDynamicFieldConfig/editEntity', params)
export const BasicqueryById = (params) => getAction('/basicprocess/basicProcessRouteInfo/queryById', params)
export const carfadd = (params) => postAction('/produceorder/produceOrderInfo/add', params)
export const cardedit = (params) => putAction('/produceorder/produceOrderInfo/edit', params)
export const queryEditForm = (params) => getAction('/produceorder/produceOrderInfo/queryById', params)
export const delConta = (params) => deleteAction('/produceorder/produceOrderInfo/delete', params)
export const produceelConta = (params) => deleteAction('/produce/produceOrderTask/delete', params)
export const revocation = (params) => postAction('/produceorder/produceOrderInfo/revocation', params)
export const deleteCol = (params) => deleteAction('/produce/produceOrderTask/delete', params)
export const idsDel = (params) => deleteAction('/produce/produceOrderTask/deleteBatch', params)
export const delContaAll = (params) => deleteAction('/produceorder/produceOrderInfo/deleteBatch', params)
export const initdata = (params) => getAction('/reportwork/produceOrderReportWork/reportWorkbench', params)
export const todaydata = (params) => getAction('/reportwork/produceOrderReportWork/reportWorkToday', params)
export const ProcessesList = (params) => postAction('/basic/basicProductionProcesses/list', params)
export const getOrderStatus = (params) => getAction('/produceorder/produceOrderInfo/getOrderStatus', params)
export const detailTableForm = (params) => getAction('/produceorder/produceOrderInfo/queryTaskById', params)
export const Qtdl = (params) => getAction('//sale/saleOrderDetail/queryById', params)

//易制造-生产进度大屏
export const getProgressListBigScreen = (params) => getAction('/signboard/progress/list', params)
